/**
 * 
 */
package com.zte.claa.inficombo.csa.app.comm.csif.mina;

import org.apache.mina.filter.codec.demux.DemuxingProtocolCodecFactory;
import org.apache.mina.filter.codec.demux.MessageDecoder;
import org.apache.mina.filter.codec.demux.MessageEncoder;

import com.zte.claa.inficombo.csa.app.comm.csif.mina.msg.CSIFMessage;

/**
 * @author 10024911
 *
 */
public class CSIFMsgCodecFactory extends DemuxingProtocolCodecFactory {
	private MessageDecoder decoder;
	private MessageEncoder<CSIFMessage> encoder;
	
	/**
	 * 编解码器工厂
	 * 
	 * @param decoder
	 * @param encoder
	 */
	public CSIFMsgCodecFactory(MessageDecoder decoder, MessageEncoder<CSIFMessage> encoder){
		super();
		this.decoder = decoder;
		this.encoder = encoder;
		this.addMessageDecoder(this.decoder);
		this.addMessageEncoder(CSIFMessage.class, this.encoder);
	}
}
